<%@page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@taglib prefix="f" uri="http://www.springframework.org/tags/form"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<jsp:include page="../../set.jsp" />
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<title>用户登录</title>
<meta name="keywords" content="用户登录">
<meta name="description" content="用户登录页面。">
<jsp:include page="../../cite.jsp" />
<script src="${_path}/lib/loong/loong-particles.js"></script>
<style>
body {
	background: #efefef;
}

.body {
	padding-top: 40px;
}

.body .panel-body>.page-header {
	margin-top: 0px;
}

.body .panel-body>.page-header>p {
	margin-bottom: 0px;
}

.body .panel-body>.form-signin {
	padding-bottom: 10px;
}

.body .panel-body>.form-signin>.btn {
	margin-top: 20px;
}

.body>.row {
	margin-top: 50px;
}

.body .vc>img {
	height: 32px;
	width: 80px;
	display: inline-block;
	vertical-align: middle;
	cursor: pointer;
}

.body .vc>input {
	display: inline-block;
	vertical-align: middle;
	width: 80px;
}

.body .repwd {
	margin-top: 0 !important;
	padding: 2px 0 !important;
}

.body .hand {
	cursor: pointer;
}

.body .sport {
	height: 350px;
}
</style>
</head>
<body>
	<jsp:include page="../../header.jsp?b=false" />
	<div class="container-fluid body">
		<div class="row">
			<div class="col-sm-7 hidden-xs text-center">
				<div class="sport" id="sport"></div>
			</div>
			<div class="col-sm-offset-0 col-xs-offset-1 col-lg-3 col-sm-4 col-xs-10">
				<div class="panel panel-default">
					<div class="panel-body">
						<div class="page-header">
							<p class="text-muted">用户登录</p>
						</div>
						<f:form class="form-signin" method="post" modelAttribute="loginParam" id="form">
							<div class="form-group">
								<label for="user">账号：</label>
								<f:input path="user" class="form-control" placeholder="用户账号" required="true" autofocus="true" />
								<f:errors class="text-danger" />
							</div>
							<div class="form-group">
								<label for="password">密码：</label>
								<f:input path="password" type="password" class="form-control" placeholder="用户密码" required="true" />
							</div>
							<div class="form-group">
								<input type="checkbox" class="hand" name="remember" ${loginParam.remember == true ? 'checked' : ''}>
								<label class="hand" for="remember">记住登录</label>
							</div>
							<c:if test="${hasVc != false}">
								<label for="vc">验证码：</label>
								<div class="vc">
									<f:input path="vc" class="form-control" placeholder="验证码" required="true" />
									<img class="img-thumbnail" src="./vc/?${System.currentTimeMillis()}" title="看不清？单击更换" data-toggle="tooltip">
								</div>
								<f:errors path="vc" class="text-danger" />
							</c:if>
							<button type="submit" class="btn btn-primary btn-block" data-loading-text="登录中...">登 录</button>
							<a href="./repwd/" class="btn btn-link btn-sm pull-right repwd">忘记密码？</a>
						</f:form>
					</div>
				</div>
			</div>
		</div>
	</div>
	<script>
		$(function() {
			$('#sport').particles();
			$('#vc+img').bind('click', function() {
				$(this).attr('src', './vc/?' + Date.parse(new Date()));
			});
			$('#form').submit(function() {
				$('#form button[data-loading-text]').button('loading');
				return true;
			});
			$('#form label[for=remember]').bind('click', function() {
				var input = $('#form input[name=remember]');
				input.prop('checked', !input.prop('checked'));
			});
		});
	</script>
</body>
</html>